// -----------------------------
// projects/c++/collatz/main.c++
// Copyright (C) 2009
// Glenn P. Downing
// -----------------------------

/*
To run the tests:
    % g++ -ansi -pedantic -lcppunit -ldl -Wall -DTEST main.c++ -o main.app
    % valgrind main.app

To run the program:
    % g++ -ansi -pedantic -Wall main.c++ -o main.app
    % valgrind main.app < Voting.in > Voting.out

To configure Doxygen:
    doxygen -g
That creates the file Doxyfile.
Make the following edits:
    EXTRACT_ALL            = YES
    EXTRACT_PRIVATE        = YES
    EXTRACT_STATIC         = YES
    GENERATE_LATEX         = NO

To document the program:
    doxygen Doxyfile
*/

// --------
// includes
// --------

#include <cassert>  // assert
#include <iostream> // cin, cout, endl, ios_base, istream, ostream

#ifdef TEST
    #include "cppunit/TestSuite.h"      // TestSuite
    #include "cppunit/TextTestRunner.h" // TestRunner
#endif // TEST

// -------
// defines
// -------

#ifdef ONLINE_JUDGE
    #define NDEBUG
#endif

// -------
// globals
// -------




// ----
// read
// ----

/**
 * reads an int into v
 * @return true if that succeeds, false otherwise
 */
bool read (std::istream& in) {
    	if (!(in >> v))
        	return false;
    	return true;}


// ----
// eval
// ----

void eval(){

}



// -----
// print
// -----

/**
 * prints the values of i, j, k, and l if valid
 * otherwise, prints "Impossible."
 */
void print (std::ostream& out) {

}

// -----
// tests
// -----

#ifdef TEST
    #include "TestVoting.h"
#endif // TEST

// ----
// main
// ----

/**
 * either runs the tests or runs the program
 */
int main () {
    	using namespace std;
    	ios_base::sync_with_stdio(false); // turn off synchronization with C I/O

    	#ifdef TEST
        // ----------
        // unit tests
        // ----------

        	CppUnit::TextTestRunner tr;
        	tr.addTest(TestVoting::suite());
        	tr.run();
    	#else
        // -------
        // program
        // -------

        while (read(cin)) {
            eval();
            print(cout);}
    	#endif // TEST

    	return 0;} 
